package com.xc.h05.service.changlongfei.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.h05.entity.Publicity;
import com.xc.h05.mapper.PublicityMapper;
import com.xc.h05.service.changlongfei.AdvisoryNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdvisoryNoticeServiceImpl implements AdvisoryNoticeService {
    @Autowired
    private PublicityMapper publicityMapper;

    @Override
    public PageInfo<Publicity> getPublicity(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<Publicity> publicityList = publicityMapper.selectByPage();
        PageInfo<Publicity> pageInfo = new PageInfo<>(publicityList);
        return pageInfo;
    }
}
